# README for Vanguard: Black Veterans and Civil Rights after World War I

## Overview

The code in this replication package generate all figures and tables in the paper and appendices. The entire pipeline can be run using `code/run_all.sh`, which sets up the required directory structure and calls 20 R scripts.

## Data availability

Our analysis incorporates information from the restricted-access full-count census data via IPUMS, which we cannot redistribute. We use names and addresses from the full-count data to match individuals to WWI draft cards, VAMI and ATS databases, and NAACP rosters. As all our analysis data uses information from the full-count census, we cannot include it in this replication package.

In building the main analysis dataset, we additionally incorporate:

- County-level covariates such as the Black population and literacy rate.
- Measures of racial prejudice at each draft board, including the share of Black officers and the share of Black troops that received training, which were hand-coded by the authors from the "Recapitulation of Investigation of Military Camps" by Major W.H. Loving.
- Measures of county-level racism, including whether the county had a Confederate monument by 1914 (Southern Poverty Law Center 2019) or experienced a lynching between 1880 and 1910 (Hines and Steelwater 2004), and whether the county experienced a race riot in the Red Summer of 1919 (Sieber 2015).

In supplementary analyses, we use:

- The African American National Biography (Gates and Higginbotham 2013) and the African American Biographical Database (ProQuest 2001).
- Questionnaires completed by WWI veterans (Connecticut State Library n.d.; Virginia War History Commission n.d.).
- Gallup Poll # 1938-0111, obtained via The Roper Center (Gallup Organization 1938).
- Data on the geography and membership of NAACP chapters (Estrada and Gregory n.d.).

### Summary of availability

We do not include the data needed to reproduce these results because we do not have permission to redistribute it.

### Details on each data source

| name                                     | filename                                      | location |
|------------------------------------------|-----------------------------------------------|----------|
| WWI draft cards (Black men)              | cards.parquet                                 | analysis |
| NAACP rosters                            | naacp.parquet                                 | analysis |
| 1930 full-count census                   | census.parquet                                | analysis |
| Cards to census matches                  | cards_census_matches.parquet                  | analysis |
| NAACP to census matches                  | naacp_census_matches.parquet                  | analysis |
| Analysis data                            | analysis.parquet                              | analysis |
| Cards to AANB/AABD matches               | cards_aa_matches.parquet                      | analysis |
| WWI veteran questionnaires               | questionnaires.parquet                        | analysis |
| Gallup Poll #1938-0111                   | USAIPO1938-0111.dta                           | gallup   |
| NAACP national membership totals by year | naacp_national_membership.xlsx                | naacp    |
| NAACP branch membership totals by year   | Gregory_NAACP combined 6e_DoNotCirculate.xlsx | naacp    |

- Draft registration cards with serial and order numbers transcribed by the authors.
  - Data file: `data/analysis/cards.parquet`
- NAACP rosters from the NAACP Papers collection on ProQuest History Vault, transcribed by the authors.
  - Data file: `data/analysis/naacp.parquet`
- 1930 full-count census data for Black men (Ruggles et al. 2021), linked to 1940 full-count census data using inter-censal links from the Census Linking Project (Abramitzky, Boustan, and Rashid 2020). This dataset also contains information about whether each individual was linked to an NAACP record.
  - Data file: `data/analysis/census.parquet` 
- Cards to census matches made using the ABE method with modifications described in the paper.
  - Data file: `data/analysis/cards_census_matches.parquet`
- NAACP to census matches made using the method described in the paper.
  - Data file: `data/analysis/naacp_census_matches.parquet`
- Analysis data, built by combining the above files and additional camp, board, and county-level data.
  - Data file: `data/analysis/analysis.parquet` 
- Cards to AANB/AABD matches made using the method described in the paper.
  - Data file: `data/analysis/cards_aa_matches.parquet`
- WWI veteran questionnaires from Connecticut and Virginia, with themes coded by the authors.
  - Data file: `data/analysis/questionnaires.parquet`
- Gallup poll # 1938-0111.
  - Data file: `data/gallup/USAIPO1938-0111.dta`
- NAACP national membership totals by year, via Estrada and Gregory (n.d.).
  - Data file: `data/naacp/naacp_national_membership.xlsx`
- NAACP branch membership totals by year, via Estrada and Gregory (n.d.).
  - Data file: `data/naacp/Gregory_NAACP combined 6e_DoNotCirculate.xlsx`

## Computational requirements

### Software requirements

We use the `renv` package to manage dependencies. If the required packages are not installed automatically, run `renv::restore()` to install them.

### Controlled randomness

No pseudo random generator is used in the analysis described here.

### Memory, runtime, and storage requirements

Approximate time needed to reproduce the analyses on a standard 2025 laptop: 10 minutes. Approximate storage space needed: 1 GB.

The code was last run on a 10-core Apple silicon-based laptop with MacOS version 15.6.

## Description of code

`code/run_all.sh` runs all the scripts below.

First, `code/make_directories.R` ensures that the necessary directories are created. Then, the following files produce all the tables and figures in the paper and appendices:

- `code/00_summary_stats.R`
- `code/01_iv_main.R`
- `code/02_iv_census_outcomes.R`
- `code/03_iv_heterogeneity.R`
- `code/04_board_discrimination.R`
- `code/05_camp_discrimination.R`
- `code/06_iv_occupation.R`
- `code/07_iv_tailincome.R`
- `code/08_iv_migration.R`
- `code/09_aa_cards.R`
- `code/10_war_experience.R`
- `code/11_naacp_membership_figs.R`
- `code/12_fs_functional_form.R`
- `code/13_fs_alternatives.R`
- `code/14_matching_robustness.R`
- `code/15_ols_board_comparison.R`
- `code/16_questionnaires.R`
- `code/17_gallup.R`
- `code/18_spillovers.R`
- `code/19_naacp_match_rates.R`
- `code/20_cards_census_match_rates.R`

### License for code

The code is licensed under a BSD license. See [LICENSE.txt](LICENSE.txt) for details.

## Instructions to replicators

Note that to successfully run the code in this package, replicators will need to obtain the data files listed above and place them in the `data` folder.

If the required packages are not installed automatically, run `renv::restore()` to install them. Then, navigate to the `code` directory, and use `source run_all.sh` to run all steps in sequence.

## List of tables and programs

The provided code reproduces all tables and figures in the paper, except Appendix Table A.IX and Appendix Figures A.I, A.II, and A.XX, which are not based on any data.

### Main text:

| figure_or_table | number | title                                                                              | subtitle                                                               | file_name                          | script                  |
|-----------------|--------|------------------------------------------------------------------------------------|------------------------------------------------------------------------|------------------------------------|-------------------------|
| Table           | I(a)   | Summary Statistics                                                                 | Draft cards                                                            | tab/cards_summary.tex              | 00_summary_stats        |
| Table           | I(b)   | Summary Statistics                                                                 | NAACP members                                                          | tab/naacp_summary.tex              | 00_summary_stats        |
| Table           | II     | Effect of Military Service on NAACP Membership -- TSLS Results                     |                                                                        | tab/iv_main.tex                    | 01_iv_main              |
| Figure          | I      | NAACP Membership, 1909 to 1950                                                     |                                                                        | fig/naacp_membership.pdf           | 10_war_experience       |
| Figure          | II     | Overview of Linking Strategy                                                       |                                                                        | other_figs/linking-4.pdf           | N/A                     |
| Figure          | III(a) | Relevance and Exogeneity of the Draft Lottery Instrument                           | First-stage relationship between order number and veteran status       | fig/fs_binscatter.pdf              | 01_iv_main              |
| Figure          | III(b) | Relevance and Exogeneity of the Draft Lottery Instrument                           | Relationship between order number and other registrant characteristics | fig/fs_exogeneity.pdf              | 01_iv_main              |
| Figure          | IV     | Effect of Military Service on NAACP Membership Duration                            |                                                                        | fig/naacp_years.pdf                | 01_iv_main              |
| Figure          | V      | Effect of Military Service on Socioeconomic Outcomes and Club Involvement          |                                                                        | fig/iv_alt_outcomes.pdf            | 02_iv_census_outcomes   |
| Figure          | VI(a)  | Heterogeneous Effects on NAACP Membership by Individual and County Characteristics | Registrant characteristics                                             | fig/iv_heterogeneity.pdf           | 03_iv_heterogeneity     |
| Figure          | VI(b)  | Heterogeneous Effects on NAACP Membership by Individual and County Characteristics | Prewar racial prejudice                                                | fig/iv_heterogeneity_county.pdf    | 03_iv_heterogeneity     |
| Figure          | VI(c)  | Heterogeneous Effects on NAACP Membership by Individual and County Characteristics | Postwar racial violence                                                | fig/iv_heterogeneity_redsummer.pdf | 03_iv_heterogeneity     |
| Figure          | VII    | NAACP Membership by Wartime Experience                                             |                                                                        | fig/naacp_wartime_exp.pdf          | 10_war_experience       |
| Figure          | VIII   | Heterogeneous Effects on NAACP Membership by Board Discrimination                  |                                                                        | fig/board_discrimination.pdf       | 04_board_discrimination |
| Figure          | IX     | Heterogeneous Effects on NAACP Membership by Camp Discrimination                   |                                                                        | fig/camps.pdf                      | 05_camp_discrimination  |
| Figure          | X(a)   | Veteran Survey Responses                                                           | Prevalence of survey themes                                            | fig/questionnaires_themes.pdf      | 16_questionnaires       |
| Figure          | X(b)   | Veteran Survey Responses                                                           | Thematic prevalence by camp discrimination                             | fig/questionnaires_camps.pdf       | 16_questionnaires       |
| Figure          | XI     | Thematic Predictors of Civic Engagement                                            |                                                                        | fig/questionnaires_vote.pdf        | 16_questionnaires       |
| Figure          | XII    | NAACP Membership Among Non-Veterans                                                |                                                                        | fig/binscatter_spillovers.pdf      | 18_spillovers           |

### Appendix:

| figure_or_table | number     | title                                                                                                      | subtitle                                         | file_name                                 | script                     |
|-----------------|------------|------------------------------------------------------------------------------------------------------------|--------------------------------------------------|-------------------------------------------|----------------------------|
| Table           | A.I        | Summary Statistics for NAACP Members, Restricted Sample                                                    |                                                  | tab/naacp_summary_restricted              | 00_summary_stats           |
| Table           | A.II       | First-Stage Relationship Between Order Number and Veteran Status                                           |                                                  | tab/first_stage.tex                       | 01_iv_main                 |
| Table           | A.III      | Effect of Military Service on Community Leadership -- TSLS Results                                         |                                                  | tab/iv_aa.tex                             | 09_aa_cards                |
| Table           | A.IV       | Effect of Military Service on Community Leadership – Restricted Occupation Types                           |                                                  | tab/iv_aa_robustness                      | 09_aa_cards                |
| Table           | A.V(a)     | Effect of Military Service on NAACP Membership -- Alternative Linking Strategies                           | x = 0                                            | tab/matching_robustness_0.tex             | 14_matching_robustness     |
| Table           | A.V(b)     | Effect of Military Service on NAACP Membership -- Alternative Linking Strategies                           | x = 2                                            | tab/matching_robustness_2.tex             | 14_matching_robustness     |
| Table           | A.VI       | Effect of Military Service on NAACP Membership -- Alternative Veteran Definitions                          |                                                  | tab/iv_robustness_veteran.tex             | 01_iv_main                 |
| Table           | A.VII      | Effect of Military Service on NAACP Membership -- Alternative Instruments                                  |                                                  | tab/iv_robustness_instruments             | 13_fs_alternatives         |
| Table           | A.VIII     | Effect of Military Service on NAACP Membership -- Alternative First Stage Functional Forms                 |                                                  | tab/fs_robustness.tex                     | 12_fs_functional_form      |
| Table           | A.IX       | Veteran Survey Themes and Examples                                                                         |                                                  | tab/example_themes                        | N/A                        |
| Figure          | A.I        | Example World War I Draft Registration Card                                                                |                                                  | other_figs/draft_card.PNG                 | N/A                        |
| Figure          | A.II       | Example NAACP Roster                                                                                       |                                                  | other_figs/naacp_roster.PNG               | N/A                        |
| Figure          | A.III(a)   | Locations of NAACP Branches                                                                                | Branch locations from NAACP rosters              | fig/naacp_map.pdf                         | 11_naacp_membership_figs   |
| Figure          | A.III(b)   | Locations of NAACP Branches                                                                                | Branch locations from Estrada and Gregory (n.d.) | fig/naacp_map_gregory.pdf                 | 11_naacp_membership_figs   |
| Figure          | A.IV       | Number of NAACP Records by Year                                                                            |                                                  | fig/naacp_roster_years.pdf                | 2_naacp_match_rates        |
| Figure          | A.V        | Full vs. Linked Samples: Relationship Between Veteran Status and 1930 Outcomes                             |                                                  | fig/sample_comparison.pdf                 | 01_iv_main                 |
| Figure          | A.VI       | Order Number on Cards and Order Number Inferred from Serial Number                                         |                                                  | fig/local_order_num_binscatter.pdf        | 01_iv_main                 |
| Figure          | A.VII      | First-Stage Relationship By Registrant Type                                                                |                                                  | fig/fs_by_type.pdf                        | 12_fs_functional_form      |
| Figure          | A.VIII     | Effect of Military Service on Residential Choice and Migration                                             |                                                  | fig/migration.pdf                         | 08_iv_migration            |
| Figure          | A.IX       | Effect of Military Service on NAACP Membership Timing                                                      |                                                  | fig/naacp_year.pdf                        | 01_iv_main                 |
| Figure          | A.X        | Effect of Military Service on Number of Appearances in NAACP Rosters                                       |                                                  | fig/naacp_years_nunique.pdf               | 01_iv_main                 |
| Figure          | A.XI       | First-Stage Relationship Using Recentered Order Number                                                     |                                                  | fig/fs_recentered.pdf                     | 12_fs_functional_form      |
| Figure          | A.XII      | Effect of Military Service on Upper-Tail Economic Status                                                   |                                                  | fig/tail_income.pdf                       | 07_iv_tailincome           |
| Figure          | A.XIII     | Effect of Military Service on Occupation Choice                                                            |                                                  | fig/iv_occupation.pdf                     | 06_iv_occupation           |
| Figure          | A.XIV(a)   | Heterogeneous Effects on Economic Status by County Characteristics                                         | Prewar racial prejudice                          | fig/iv_heterogeneity_county_income.pdf    | 03_iv_heterogeneity        |
| Figure          | A.XIV(b)   | Heterogeneous Effects on Economic Status by County Characteristics                                         | Postwar racial violence                          | fig/iv_heterogeneity_redsummer_income.pdf | 03_iv_heterogeneity        |
| Figure          | A.XV(a)    | Heterogeneous Effects on NAACP Membership by Individual and County Characteristics -- Standardized Effects | Registrant characteristics                       | fig/iv_heterogeneity_std.pdf              | 03_iv_heterogeneity        |
| Figure          | A.XV(b)    | Heterogeneous Effects on NAACP Membership by Individual and County Characteristics -- Standardized Effects | Prewar racial prejudice                          | fig/iv_heterogeneity_county_std.pdf       | 03_iv_heterogeneity        |
| Figure          | A.XV(c)    | Heterogeneous Effects on NAACP Membership by Individual and County Characteristics -- Standardized Effects | Postwar racial violence                          | fig/iv_heterogeneity_redsummer_std.pdf    | 03_iv_heterogeneity        |
| Figure          | A.XVI      | NAACP Membership by Wartime Experience -- Adjusted for Card Characteristics                                |                                                  | fig/naacp_wartime_adjusted.pdf            | 10_war_experience          |
| Figure          | A.XVII     | Heterogeneous Effects on NAACP Membership by Board Discrimination -- Adjusted for Marriage and Occupation  |                                                  | fig/board_discrimination_robust.pdf       | 04_board_discrimination    |
| Figure          | A.XVIII    | Veteran Characteristics by Board Discrimination                                                            |                                                  | fig/ols_board_comparison.pdf              | 15_ols_board_comparison    |
| Figure          | A.XIX      | Heterogeneous Effects on NAACP Membership by Camp Discrimination -- Matched Samples                        |                                                  | fig/camps_matched.pdf                    | 05_camp_discrimination     |
| Figure          | A.XX       | Example Veteran Survey                                                                                     |                                                  | fig/questionnaire_back.pdf                | N/A                        |
| Figure          | A.XXI      | Heterogeneous Effects on NAACP Membership by Share of Camp from a Registrant's Area                        |                                                  | fig/iv_camp_fractionalization.pdf         | 05_camp_discrimination     |
| Figure          | A.XXII     | Thematic Prevalence by Board Discrimination                                                                |                                                  | fig/questionnaires_boards.pdf             | 16_questionnaires          |
| Figure          | A.XXIII(a) | Political Views by Race and Veteran Status -- Gallup Survey (1938)                                         | Black respondents                                | fig/gallup_black.pdf                      | 17_gallup                  |
| Figure          | A.XXIII(b) | Political Views by Race and Veteran Status -- Gallup Survey (1938)                                         | White respondents                                | fig/gallup_white.pdf                      | 17_gallup                  |
| Table           | B.I        | NAACP to Census Linking Rates by Method                                                                    |                                                  | tab/naacp_match_rates_by_type.tex         | 19_naacp_match_rates       |
| Table           | B.II       | NAACP to Census Linking Rates by City                                                                      |                                                  | tab/naacp_match_rates.tex                 | 19_naacp_match_rates       |
| Table           | B.III      | Cards to Census Linking Rates by Method                                                                    |                                                  | tab/cards_census_match_rates              | 20_cards_census_match_rates |

## References

- Abramitzky, Ran, Leah Platt Boustan, and Myera Rashid, "Census linking project: Version 1.0 [dataset]," Data retrieved from
https://censuslinkingproject.org, 2020.
- Connecticut State Library, "Connecticut WWI Military Questionnaires, 1919–1920."
- Estrada, Josue and James Gregory, "Mapping NAACP chapters 1912-1977." Accessed: December 4, 2022.
- Gallup Organization, "Gallup Poll # 1938-0111: Military Pensions/Unions/Politics/Electric Power Companies, 1938 [dataset]," Roper Center for Public Opinion Research.
- Hines, Elizabeth and Eliza Steelwater, "Project HAL: Historical American Lynching Data Collection Project," 2004. Accessed: July 15, 2019.
- ProQuest, "African American biographical database: AABD," ProQuest Information and Learning Co.
- Ruggles, Steven, Catherine A. Fitch, Ronald Goeken, J. David Hacker, Matt A. Nelson, Evan Roberts,  Megan Schouwiler, and Matthew Sobek, "IPUMS Ancestry Full Count Data: Version 3.0 R [restricted dataset]," Minneapolis, MN: IPUMS, 2021.
- Sieber, Karen, "Visualizing the Red Summer: a collection of primary source material about the
race riots of 1919," 2015.
- Southern Poverty Law Center, "Whose heritage? Public symbols of the Confederacy," 2019. Accessed: July 15, 2019.
- Virginia War History Commission, "World War I History Commission questionnaires."

---

## Acknowledgements

This README is adapted from the example [here](https://github.com/social-science-data-editors/template_README/blob/development/template-README.md), written by Lars Vilhuber, Miklós Koren, Joan Llull, Marie Connolly, and Peter Morrow.
